package com.jy.adscm.system.controller;

import com.baomidou.mybatisplus.plugins.Page;
import com.jy.adscm.annotation.AdscmLogger;
import com.jy.adscm.bean.system.JyCode;
import com.jy.adscm.bean.system.JyUser;
import com.jy.adscm.exception.AdscmSystemException;
import com.jy.adscm.security.support.SimpleResponse;
import com.jy.adscm.security.utils.Token;
import com.jy.adscm.support.SimpleCoreResponse;
import com.jy.adscm.system.mapper.mysql.JyCodeMapper;
import com.jy.adscm.system.mapper.mysql.JyCodeTypeMapper;
import com.jy.adscm.system.service.JyMenuService;
import com.jy.adscm.system.service.JyUserService;
import com.jy.adscm.system.utils.AdscmSystemUtils;
import com.jy.adscm.utils.AdscmBaseUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.multipart.commons.CommonsMultipartResolver;

import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.List;

/**
 * @author yyy
 * @ClassName AdscmSystemController
 * @Description 用户管理Controller
 * @date 2018/8/1 17:34
 */
@RestController
@RequestMapping("/adscm/system/code")
public class AdscmCodeController {
      @Autowired
      JyCodeMapper jyCodeMapper;
    @RequestMapping("queryCoedByType/{type}")
    public SimpleCoreResponse insert(@PathVariable String type) throws AdscmSystemException {
        List<JyCode> jyCodeByCodeType = jyCodeMapper.getJyCodeByCodeType(type);
        return new SimpleCoreResponse("200", "查询成功", jyCodeByCodeType);
    }
}
